/*******************************************************************************

This code file produces Figure A2, "421-a and the New York City Residential Property Market."

*******************************************************************************/

*** Manage settings

	run "$dir/code/modules/settings.do"

********************************************************************************
* Panel A
********************************************************************************
	
*** Load data

	use "$data/raw/figureA2panelA.dta", clear
	
*** Make graph
	
	gen upper = 30
	
	local barcall upper y if inrange(y, 2003, 2015), bcolor(gs14) blcolor(none) base(0)
	
	tw bar `barcall' || line new_421a_ completions_ year, legend(order(2 "Issuance of 421-a FCEs" 3 "Completions")) ///
		xtitle("") ytitle("Thousands of Units") lcolor(navy maroon) graphregion(color(white)) plotregion(margin(zero)) ///
		ylabel(, nogrid)
		
	graph export "$figs/421a_FCE.pdf", replace
	graph export "$figs_overleaf/421a_FCE.pdf", replace

********************************************************************************
* Panel B
********************************************************************************
	
*** Load data

	use "$data/raw/figureA2panelB.dta", clear
	
	gen val_exceptions_new = val_exceptions
	replace val_exceptions_new = value_excepted_421a * atr_class2 / 100 if missing(val_exceptions_new)
	
	gen sh_val_excepted_421a = val_exceptions_new / (billable_av_class2 * atr_class2 / 100)
	
*** Make graph
	
	gen upper = 0.15
	
	local barcall upper y if inrange(y, 2003, 2015), bcolor(gs14) blcolor(none) base(0)
	
	tw bar `barcall' || line sh_val_excepted_421a year, ///
		xtitle("Fiscal Year") ytitle("421-a as a Share of Class 2 Billable Assessed Value") ///
		lcolor(navy) graphregion(color(white)) plotregion(margin(zero)) legend(off) ylabel(, nogrid)
		
	graph export "$figs/shbav_421a.pdf", replace
	graph export "$figs_overleaf/shbav_421a.pdf", replace
